cmake_minimum_required(VERSION 3.4.1)

#include_directories(src/main/jni/includes)
#aux_source_directory(src/main/jni/ JNI_DIR)

include_directories(src/main/jni/matrix/includes)
include_directories(src/main/jni/matrix/lib/includes)
aux_source_directory(src/main/jni/matrix/src/ MATRIX_SRC_DIR)
aux_source_directory(src/main/jni/matrix/lib/ MATRIX_LIB_DIR)

list(APPEND MATRIX_SRC_DIR ${MATRIX_LIB_DIR})

add_library(
    matrix-hardware
    SHARED
    ${MATRIX_SRC_DIR}
)
find_library(
    log-lib
    log
)
target_link_libraries(
    matrix-hardware
    ${log-lib}
)

add_library(
    friendlyarm-hardware
    SHARED
    IMPORTED
)
set_target_properties(
    friendlyarm-hardware
    PROPERTIES IMPORTED_LOCATION
    libs/${ANDROID_ABI}/libfriendlyarm-hardware.so
)


